package cn.whale.task.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author whale.chen
 * @since 2020-12-14
 */
@TableName("t_mq_log")
@Data
public class MqLog extends Model<MqLog> {


    public static final Integer STATUS_ERROR = 2;
    public static final Integer STATUS_SUCCESS = 1;
    public static final Integer STATUS_SENDING = 0;

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("message_id")
    private String messageId;
    private String content;  //内容
    private Integer retry = 0;  //重试次数
    /**
     * 1.发送成功
     */
    private Integer status;
    @TableField("create_time")
    private Date createTime;
    private String exchange;
    private String routingkey;
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
